const net=require('net');
let server=net.createServer(socket=>{
    console.log(socket,'有人连接');
    socket.on('data',data=>{
        let str=data.toString();
        let aHeaders=str.split('\r\n');
        console.log(aHeaders)
    })
    socket.on('end',function(){
        console.log('连接断开')
    })
});
server.listen(8080);